// 歌曲关api
import { get, post } from '@/utils/http'
import { threeApiConfig } from '@/utils/config'

// 歌曲详情
export const songDetailList = (ids, br = 999000) => get(
  threeApiConfig.baseApi + `/song/detail?ids=[${ids}]&br=${br}`
)

// 歌曲歌词
export const songLyric = id => get(
  threeApiConfig.baseApi + `/song/lyric?os=iphone&id=${id}&lv=-1&kv=-1&tv=-1`
)

// 获取歌曲播放地址
export const songUrl = (ids = [], br = 999000) => post(
  threeApiConfig.baseApi + `/song/enhance/player/url?ids=[${ids}]&br=${br}`
)

// ----------获取推荐歌单----------
export const playList = () => get(
  threeApiConfig.baseApi + '/personalized/playlist'
)

// 获取id歌单详情
export const playListDetail = (id, n = 100000, s = 8) => post(
  threeApiConfig.baseApi + `/v3/playlist/detail?id=${id}&n=${n}&s=${s}`
)

// 获取全部歌单分类
export const playListCatalogue = () => get(
  threeApiConfig.baseApi + '/playlist/catalogue'
)

// 获取推荐 10首 新歌曲
export const newSong = () => get(
  threeApiConfig.baseApi + '/personalized/newsong'
)
